Could not open this page in Design View. A script is not permitted inside a LABEL tag.

The HTML markup for a <LABEL> element on this Web page includes an embedded script. Embedded scripts cannot be placed within a <LABEL> element.

To correct this error

  1. Open this Web page for editing in HTML view.
  2. Move the script from within the <LABEL> element to another location in the HTML markup, or delete the script.
  3. Save the page.

    You can then continue to edit the page in either HTML view or Design view.

Example

To run function myFunction() when the mouse event onClick is received by label myLabel:

  1. Define a FOR attribute whose value is an element ID (FOR="ElementID") within the opening tag of myLabel

    - or -

    define an .htmlFor property MyLabel.htmlFor="ElementID" within a SCRIPT.

  2. Call the desired MyFunction() as the onClick event handler within the opening tag of the HTML element identified by that "ElementID":
    <OtherElement ID="ElementID" onClick="MyFunction()">

When MyLabel receives the onClick event, this event will bubble through to the OtherElement to which MyLabel is bound. This OtherElement will run MyFunction() as its onClick event handler.